/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package bts.view.languages;

import javax.swing.AbstractListModel;
import java.util.ArrayList;


/**
 *
 * @author juan
 */
public class StringJListModel extends AbstractListModel {
    
    String[] strings;
    private ArrayList<String> str= new ArrayList<String>();

    public void addString(String str) {
        this.str.add(str);
        //this.strings = this.str.toArray(new String[this.str.size()]);
    }

    public Object getElementAt(int i) {
        return str.get(i);
    }

    public int getSize() {
                 return str.size();
    }

    public String[] getStringArray() {
        return str.toArray(new String[str.size()]);
    }

    public void removeElmentsAt(int[] index) {
        for (int i = 0; i < index.length; i++) {
           // this.str.
        }
        this.str.trimToSize();
        //this.strings = this.str.toArray(new String[this.str.size()]);
    }

}
